package com.alexsun.newslist

import android.annotation.SuppressLint
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView

class NewsDetail : AppCompatActivity() {
    private var titleView: TextView? = null
    private var contentView: TextView? = null

    @SuppressLint("SetTextI18n")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_news_detail)

        val bundle = intent.getBundleExtra("list")
        val text = bundle?.getString("info")

        titleView = findViewById(R.id.detail_title)
        contentView = findViewById(R.id.detail_content)

        titleView!!.text = text
        contentView!!.text = "这是 $text 的内容"
    }
}